import { defineStore } from 'pinia'

export const useLayoutStore = defineStore(
  {
    id: 'layoutStore',

    // 开启数据缓存
    persist: {
      enabled: true,
    },

    state: () => {
      return {
        // 侧边栏是否缩进
        barSlide: false
      }
    },

    actions: {
      // 侧边栏伸缩切换
      changeSlide() {
        this.barSlide = !this.barSlide
      }
    }
  }
)
